package com.homegoods.discover.item;

import com.alibaba.android.arouter.launcher.ARouter;
import com.homegoods.discover.R;
import com.homegoods.discover.model.MessageTipModel;
import com.homegoods.aroutercomment.ARouterPath;
import com.kedll.library.adapter.MultiTypeAdapter;
import com.kedll.library.mvp.BaseItem;

/**
 * @author QiQi
 * @ClassName: ActivityItem
 * @date 2018/10/3
 * @description 消息通知
 */
public class MessageTipItem extends BaseItem<MessageTipModel> {
    public MessageTipItem(MessageTipModel data, MultiTypeAdapter adapter) {
        super(data);

        setOnClickListener(v -> ARouter.getInstance()
                .build(ARouterPath.PATH_MESSAGE_DETAIL)
                .withString("id", data.getId())
                .navigation());
    }


    public String getDate() {
        return getData().getDate();
    }

    public String getTitle() {
        return getData().getTitle();
    }


    @Override
    public int getLayout() {
        return R.layout.discover_item_message_tip;
    }
}
